#pragma once

#include <MOE/Core/BasicTypes.h>
#include "TypeToken.hpp"

#include <string>

namespace MOE
{
	namespace Core
	{
		class ClassMeta;
	}

	namespace System
	{
		namespace NonIntrusive
		{
			class TokenClassMetaManager;

			// Base type of all type initializer classes.
			// These classes have most of their member functions in common, thus they can be merged into one.
			// The templated class will only need to resolve token value.
			class TypeInitializerBase
			{
			public:
				explicit TypeInitializerBase(tTokenType tokenValue);

				tTokenType GetTokenValue() const { return mTypeTokenValue; }

				void SetParentClass(tTokenType parentTokenValue) { mParentTokenValue = parentTokenValue; }
				tTokenType GetParentClass() const { return mParentTokenValue; }

				void SetClassName(const Core::char8* className) { mClassName = className; }
				const Core::char8* GetClassName() const { return mClassName.c_str(); }

				void SetClassSize(Core::tSize elementSize) { mClassSize = elementSize; }
				Core::tSize GetClassSize() const { return mClassSize; }

				Core::ClassMeta* CreateClassMeta(TokenClassMetaManager* manager);

			private:
				tTokenType mTypeTokenValue;
				tTokenType mParentTokenValue;
				std::string mClassName;
				Core::tSize mClassSize;
			};
		}
	}
}
